package com.ssy.lingxi.marketing.controller.activity;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.marketing.model.vo.common.request.OperateLogRequest;
import com.ssy.lingxi.marketing.model.vo.common.response.OperateLogInnerResponse;
import com.ssy.lingxi.marketing.model.vo.common.response.OperateLogOuterResponse;
import com.ssy.lingxi.marketing.service.IOperateLogService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @menu 平台后台-系统管理-营销-操作日志
 * @author ds
 * @date 2021/6/18
 * @version 2.0.0
 */
@RestController
@RequestMapping("/marketing/operate/log")
public class OperateLogController extends BaseController {

    @Resource
    private IOperateLogService operateLogService;

    /**
     * 外部日志
     */
    @RequestMapping(value = "/outer/page", method = RequestMethod.POST)
    public Wrapper<PageData<OperateLogOuterResponse>> pageOuterLog(@Valid @RequestBody OperateLogRequest request) {
        return operateLogService.pageOuterLog(request);
    }

    /**
     * 内部日志
     */
    @RequestMapping(value = "/inner/page", method = RequestMethod.POST)
    public Wrapper<PageData<OperateLogInnerResponse>> pageInnerLog(@Valid @RequestBody OperateLogRequest request) {
        return operateLogService.pageInnerLog(request);
    }


}
